/*
 * Statistics.cpp
 *
 *  Created on: 2013-01-31
 *      Author: mathieu
 */

#include "semol/core/Statistics.h"

namespace semol {

std::map<std::string, float> Statistics::_defaultData;
bool Statistics::_defaultDataInitialized = false;

const std::map<std::string, float> & Statistics::defaultData()
{
	Statistics stat;
	return _defaultData;
}

Statistics::Statistics() :
	_extended(0),
	_refImageId(0),
	_loopClosureId(0)
{
	_defaultDataInitialized = true;
}

Statistics::~Statistics()
{
}

// name format = "Grp/Name/unit"
void Statistics::addStatistic(const std::string & name, float value)
{
	_data.insert(std::pair<std::string, float>(name, value));
}

void Statistics::setRefRawData(const std::list<SensorRaw> & refRawData)
{
	_refRawData = refRawData;
}

void Statistics::setLoopClosureRawData(const std::list<SensorRaw> & loopClosureRawData)
{
	_loopClosureRawData = loopClosureRawData;
}

} /* namespace semol */
